package com.corona.game;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.audio.Music;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.glutils.ShaderProgram;
import com.corona.Game;
import com.corona.game.util.TextureCache;
import com.corona.game.util.audio.AudioLoader;
import java.util.Locale;

/* compiled from: Battle.java */
/* loaded from: pokewilds.jar:com/pkmngen/game/EvolutionAnim.class */
public class EvolutionAnim extends Action {
    public static Sprite bgSprite;
    public static boolean drawSprite = true;
    public static boolean drawPostEvoBottom = false;
    public static boolean drawPostEvoTop = false;
    public static boolean isGreyscale = false;
    public static boolean playSound = false;
    public static boolean isDone = false;
    public static boolean drawPostEvo = false;
    public static String vertexShader = "attribute vec4 a_position;\nattribute vec4 a_color;\nattribute vec2 a_texCoord0;\n\nuniform mat4 u_projTrans;\n\nvarying vec4 v_color;\nvarying vec2 v_texCoords;\n\nvoid main() {\n    v_color = a_color;\n    v_texCoords = a_texCoord0;\n    gl_Position = u_projTrans * a_position;\n}";
    public static String fragmentShader = "#ifdef GL_ES\n    precision mediump float;\n#endif\n\nvarying vec4 v_color;\nvarying vec2 v_texCoords;\nuniform sampler2D u_texture;\n\nvoid main() {\n  vec4 c = v_color * texture2D(u_texture, v_texCoords);\n  int r = int(c.r*31.0);\n  int g = int(c.g*31.0);\n  int b = int(c.b*31.0);\n  int sum = r + g + b;\n  float grey = float(int(sum*sum*sum)/25947)/31.0;\n  gl_FragColor = vec4(grey, grey, grey, c.a);\n}";
    Sprite spritePart;
    Sprite preEvoSprite;
    Sprite postEvoSprite;
    Sprite preEvoSpriteTop;
    Sprite postEvoSpriteTop;
    Sprite preEvoSpriteBottom;
    Sprite postEvoSpriteBottom;
    Music preEvoCry;
    Music postEvoCry;
    Pokemon targetPokemon;
    String targetName;
    public Action.Layer layer = Action.Layer.gui_107;
    int timer = 0;
    ShaderProgram grayscaleShader = new ShaderProgram(vertexShader, fragmentShader);

    public EvolutionAnim(Pokemon targetPokemon, String evolveTo, Action nextAction) {
        super(new Object[0]);
        this.nextAction = nextAction;
        this.targetPokemon = targetPokemon;
        this.targetName = evolveTo;
        bgSprite = new Sprite(TextureCache.get(Gdx.files.internal("battle/battle_bg3.png")), 0, 0, 176, 160);
        this.preEvoSprite = new Sprite((Sprite) targetPokemon.sprite);
        this.preEvoSprite.flip(true, false);
        this.preEvoSpriteBottom = new Sprite(this.preEvoSprite);
        this.preEvoSpriteBottom.setRegionY(((int) this.preEvoSprite.getWidth()) / 2);
        this.preEvoSpriteBottom.setRegionHeight(((int) this.preEvoSprite.getWidth()) / 2);
        this.preEvoSpriteTop = new Sprite(this.preEvoSprite);
        this.preEvoSpriteTop.setRegionY(0);
        this.preEvoSpriteTop.setRegionHeight(((int) this.preEvoSprite.getWidth()) / 2);
    }

    @Override // com.corona.game.Action
    public void firstStep(Game game) {
        drawSprite = false;
        drawPostEvoBottom = false;
        drawPostEvoTop = false;
        isGreyscale = false;
        playSound = false;
        isDone = false;
        drawPostEvo = false;
        if (!Specie.species.containsKey(this.targetName)) {
            Specie.species.put(this.targetName, new Specie(this.targetName));
        }
        Specie specie = Specie.species.get(this.targetName);
        this.postEvoSprite = new Sprite((Sprite) specie.sprite);
        if (this.targetPokemon.isShiny) {
            this.postEvoSprite = new Sprite((Sprite) specie.spriteShiny);
        }
        this.postEvoSprite.flip(true, false);
        this.postEvoSpriteBottom = new Sprite(this.postEvoSprite);
        this.postEvoSpriteBottom.setRegionY((((int) this.postEvoSprite.getWidth()) - ((int) this.preEvoSprite.getWidth())) + (((int) this.preEvoSprite.getWidth()) / 2));
        this.postEvoSpriteBottom.setRegionHeight(((int) this.preEvoSprite.getWidth()) / 2);
        this.postEvoSpriteTop = new Sprite(this.postEvoSprite);
        this.postEvoSpriteTop.setRegionY(0);
        this.postEvoSpriteTop.setRegionHeight((((int) this.postEvoSprite.getWidth()) - ((int) this.preEvoSprite.getWidth())) + (((int) this.preEvoSprite.getWidth()) / 2));
        if (game.battle.drawAction != null) {
            game.battle.drawAction.cleanup(game);
        }
        game.currMusic.stop();
    }

    @Override // com.corona.game.Action
    public String getCamera() {
        return "gui";
    }

    @Override // com.corona.game.Action
    public Action.Layer getLayer() {
        return this.layer;
    }

    @Override // com.corona.game.Action
    public void step(Game game) {
        game.uiBatch.draw(bgSprite, -8.0f, -8.0f);
        if (this.timer == 33) {
            drawSprite = true;
            game.insertAction(this.nextAction);
        }
        if (playSound) {
            playSound = false;
            AudioLoader.loadMusic("sounds/evolve_fanfare1.ogg").play();
        }
        if (drawSprite) {
            if (isGreyscale) {
                game.uiBatch.setShader(this.grayscaleShader);
            }
            if (drawPostEvo) {
                this.spritePart.set(this.targetPokemon.sprite);
                this.spritePart.flip(true, false);
                game.uiBatch.draw(this.spritePart, (float) ((80 - (((int) this.spritePart.getWidth()) / 2)) + 4), 72.0f);
            } else {
                if (drawPostEvoBottom) {
                    this.spritePart = this.postEvoSpriteBottom;
                } else {
                    this.spritePart = this.preEvoSpriteBottom;
                }
                game.uiBatch.draw(this.spritePart, (float) ((80 - (((int) this.spritePart.getWidth()) / 2)) + 4), 72.0f);
                if (drawPostEvoTop) {
                    this.spritePart = this.postEvoSpriteTop;
                } else {
                    this.spritePart = this.preEvoSpriteTop;
                }
                game.uiBatch.draw(this.spritePart, (float) ((80 - (((int) this.spritePart.getWidth()) / 2)) + 4), (float) (72 + (((int) this.preEvoSpriteTop.getWidth()) / 2)));
            }
            game.uiBatch.setShader(null);
        }
        if (isDone) {
            game.actionStack.remove(this);
        }
        this.timer++;
    }

    /* compiled from: Battle.java */
    /* loaded from: pokewilds.jar:com/pkmngen/game/EvolutionAnim$HandleInput.class */
    public static class HandleInput extends Action {
        int timer = 0;
        Action currAction;
        String evolveTo;
        Pokemon pokemon;

        public HandleInput(Pokemon pokemon, String evolveTo, Action nextAction) {
            super(new Object[0]);
            this.pokemon = pokemon;
            this.evolveTo = evolveTo;
            this.nextAction = nextAction;
        }

        @Override // com.corona.game.Action
        public void firstStep(Game game) {
            this.currAction = new Battle.LoadAndPlayAnimation(game, "evolve", null, new WaitFrames(game, 30, new RunCode(()
            /*  JADX ERROR: Method code generation error
                jadx.core.utils.exceptions.CodegenException: Error generate insn: 0x00dc: IPUT
                  (wrap: com.corona.game.Battle$LoadAndPlayAnimation : 0x00d9: CONSTRUCTOR  (r1v0 com.corona.game.Battle$LoadAndPlayAnimation A[REMOVE]) =
                  (r63v0 'game' com.corona.Game A[D('game' com.corona.Game)])
                  ("evolve")
                  (null com.corona.game.Pokemon)
                  (wrap: com.corona.game.WaitFrames : 0x00d6: CONSTRUCTOR  (r6v0 com.corona.game.WaitFrames A[REMOVE]) =
                  (r63v0 'game' com.corona.Game A[D('game' com.corona.Game)])
                  (30 int)
                  (wrap: com.corona.game.RunCode : 0x00d3: CONSTRUCTOR  (r10v0 com.corona.game.RunCode A[REMOVE]) =
                  (wrap: java.lang.Runnable : 0x0016: INVOKE_CUSTOM (r12v1 java.lang.Runnable A[REMOVE]) =
                  (r62v0 'this' com.corona.game.EvolutionAnim$HandleInput A[D('this' com.corona.game.EvolutionAnim$HandleInput), DONT_INLINE, IMMUTABLE_TYPE, THIS])
                  (r63v0 'game' com.corona.Game A[D('game' com.corona.Game), DONT_INLINE])

                 handle type: INVOKE_DIRECT
                 lambda: java.lang.Runnable.run():void
                 call insn: ?: INVOKE  (r12 I:com.corona.game.EvolutionAnim$HandleInput), (r13 I:com.corona.Game) type: DIRECT call: com.corona.game.EvolutionAnim.HandleInput.lambda$firstStep$0(com.corona.Game):void)
                  (wrap: com.corona.game.PokemonIntroAnim : 0x00d0: CONSTRUCTOR  (r13v1 com.corona.game.PokemonIntroAnim A[REMOVE]) =
                  (wrap: com.corona.game.DisplayText$Clear : 0x00cd: CONSTRUCTOR  (r15v0 com.corona.game.DisplayText$Clear A[REMOVE]) =
                  (r63v0 'game' com.corona.Game A[D('game' com.corona.Game)])
                  (wrap: com.corona.game.WaitFrames : 0x00ca: CONSTRUCTOR  (r18v0 com.corona.game.WaitFrames A[REMOVE]) =
                  (r63v0 'game' com.corona.Game A[D('game' com.corona.Game)])
                  (3 int)
                  (wrap: com.corona.game.DisplayText : 0x00c7: CONSTRUCTOR  (r22v0 com.corona.game.DisplayText A[REMOVE]) =
                  (r63v0 'game' com.corona.Game A[D('game' com.corona.Game)])
                  (wrap: java.lang.String : ?: STR_CONCAT
                  ("Congratulations! Your ")
                  (wrap: java.lang.String : 0x0045: INVOKE
                  (wrap: java.lang.String : 0x003f: IGET
                  (wrap: com.corona.game.Pokemon : 0x003c: IGET
                  (r62v0 'this' com.corona.game.EvolutionAnim$HandleInput A[D('this' com.corona.game.EvolutionAnim$HandleInput), IMMUTABLE_TYPE, THIS])
                 com.corona.game.EvolutionAnim.HandleInput.pokemon com.corona.game.Pokemon)
                 com.corona.game.Pokemon.nickname java.lang.String)
                  (wrap: java.util.Locale : 0x0042: SGET   java.util.Locale.ROOT java.util.Locale)
                 type: VIRTUAL call: java.lang.String.toUpperCase(java.util.Locale):java.lang.String)
                )
                  (wrap: java.lang.String : ?: CAST (java.lang.String) (null java.lang.String))
                  true
                  true
                  (wrap: com.corona.game.Action : ?: CAST (com.corona.game.Action) (wrap: com.corona.game.DisplayText$Clear : 0x00c4: CONSTRUCTOR  (r29v0 com.corona.game.DisplayText$Clear A[REMOVE]) =
                  (r63v0 'game' com.corona.Game A[D('game' com.corona.Game)])
                  (wrap: com.corona.game.WaitFrames : 0x00c1: CONSTRUCTOR  (r32v0 com.corona.game.WaitFrames A[REMOVE]) =
                  (r63v0 'game' com.corona.Game A[D('game' com.corona.Game)])
                  (3 int)
                  (wrap: com.corona.game.DisplayText : 0x00be: CONSTRUCTOR  (r36v0 com.corona.game.DisplayText A[REMOVE]) =
                  (r63v0 'game' com.corona.Game A[D('game' com.corona.Game)])
                  (wrap: java.lang.String : ?: STR_CONCAT
                  ("evolved into ")
                  (wrap: java.lang.String : 0x0074: INVOKE
                  (wrap: java.lang.String : 0x006e: IGET
                  (r62v0 'this' com.corona.game.EvolutionAnim$HandleInput A[D('this' com.corona.game.EvolutionAnim$HandleInput), IMMUTABLE_TYPE, THIS])
                 com.corona.game.EvolutionAnim.HandleInput.evolveTo java.lang.String)
                  (wrap: java.util.Locale : 0x0071: SGET   java.util.Locale.ROOT java.util.Locale)
                 type: VIRTUAL call: java.lang.String.toUpperCase(java.util.Locale):java.lang.String)
                  ("!")
                )
                  ("fanfare2.ogg")
                  true
                  false
                  (wrap: com.corona.game.Action : ?: CAST (com.corona.game.Action) (wrap: com.corona.game.CheckMovesLearned : 0x00bb: CONSTRUCTOR  (r43v0 com.corona.game.CheckMovesLearned A[REMOVE]) =
                  (wrap: com.corona.game.Pokemon : 0x008b: IGET  (r45v1 com.corona.game.Pokemon A[REMOVE]) =
                  (r62v0 'this' com.corona.game.EvolutionAnim$HandleInput A[D('this' com.corona.game.EvolutionAnim$HandleInput), IMMUTABLE_TYPE, THIS])
                 com.corona.game.EvolutionAnim.HandleInput.pokemon com.corona.game.Pokemon)
                  (wrap: com.corona.game.DisplayText$Clear : 0x00b8: CONSTRUCTOR  (r46v0 com.corona.game.DisplayText$Clear A[REMOVE]) =
                  (r63v0 'game' com.corona.Game A[D('game' com.corona.Game)])
                  (wrap: com.corona.game.WaitFrames : 0x00b5: CONSTRUCTOR  (r49v0 com.corona.game.WaitFrames A[REMOVE]) =
                  (r63v0 'game' com.corona.Game A[D('game' com.corona.Game)])
                  (3 int)
                  (wrap: com.corona.game.EvolutionAnim$Done : 0x00b2: CONSTRUCTOR  (r53v0 com.corona.game.EvolutionAnim$Done A[REMOVE]) =
                  (wrap: com.corona.game.SetField : 0x00af: CONSTRUCTOR  (r55v0 com.corona.game.SetField A[REMOVE]) =
                  (wrap: com.corona.game.MusicController : 0x00a2: IGET  (r57v1 com.corona.game.MusicController A[REMOVE]) = (r63v0 'game' com.corona.Game A[D('game' com.corona.Game)]) com.corona.Game.musicController com.corona.game.MusicController)
                  ("evolveMusicFadeout")
                  true
                  (wrap: com.corona.game.Action : 0x00ac: IGET  (r60v1 com.corona.game.Action A[REMOVE]) =
                  (r62v0 'this' com.corona.game.EvolutionAnim$HandleInput A[D('this' com.corona.game.EvolutionAnim$HandleInput), IMMUTABLE_TYPE, THIS])
                 com.corona.game.EvolutionAnim.HandleInput.nextAction com.corona.game.Action)
                 call: com.corona.game.SetField.<init>(java.lang.Object, java.lang.String, java.lang.Object, com.corona.game.Action):void type: CONSTRUCTOR)
                 call: com.corona.game.EvolutionAnim.Done.<init>(com.corona.game.Action):void type: CONSTRUCTOR)
                 call: com.corona.game.WaitFrames.<init>(com.corona.Game, int, com.corona.game.Action):void type: CONSTRUCTOR)
                 call: com.corona.game.DisplayText.Clear.<init>(com.corona.Game, com.corona.game.Action):void type: CONSTRUCTOR)
                 call: com.corona.game.CheckMovesLearned.<init>(com.corona.game.Pokemon, com.corona.game.Action):void type: CONSTRUCTOR))
                 call: com.corona.game.DisplayText.<init>(com.corona.Game, java.lang.String, java.lang.String, boolean, boolean, com.corona.game.Action):void type: CONSTRUCTOR)
                 call: com.corona.game.WaitFrames.<init>(com.corona.Game, int, com.corona.game.Action):void type: CONSTRUCTOR)
                 call: com.corona.game.DisplayText.Clear.<init>(com.corona.Game, com.corona.game.Action):void type: CONSTRUCTOR))
                 call: com.corona.game.DisplayText.<init>(com.corona.Game, java.lang.String, java.lang.String, boolean, boolean, com.corona.game.Action):void type: CONSTRUCTOR)
                 call: com.corona.game.WaitFrames.<init>(com.corona.Game, int, com.corona.game.Action):void type: CONSTRUCTOR)
                 call: com.corona.game.DisplayText.Clear.<init>(com.corona.Game, com.corona.game.Action):void type: CONSTRUCTOR)
                 call: com.corona.game.PokemonIntroAnim.<init>(com.corona.game.Action):void type: CONSTRUCTOR)
                 call: com.corona.game.RunCode.<init>(java.lang.Runnable, com.corona.game.Action):void type: CONSTRUCTOR)
                 call: com.corona.game.WaitFrames.<init>(com.corona.Game, int, com.corona.game.Action):void type: CONSTRUCTOR)
                 call: com.corona.game.Battle.LoadAndPlayAnimation.<init>(com.corona.Game, java.lang.String, com.corona.game.Pokemon, com.corona.game.Action):void type: CONSTRUCTOR)
                  (r62v0 'this' com.corona.game.EvolutionAnim$HandleInput A[D('this' com.corona.game.EvolutionAnim$HandleInput), IMMUTABLE_TYPE, THIS])
                 com.corona.game.EvolutionAnim.HandleInput.currAction com.corona.game.Action in method: com.corona.game.EvolutionAnim.HandleInput.firstStep(com.corona.Game):void, file: pokewilds.jar:com/pkmngen/game/EvolutionAnim$HandleInput.class
                	at jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:285)
                	at jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:248)
                	at jadx.core.codegen.RegionGen.makeSimpleBlock(RegionGen.java:105)
                	at jadx.core.dex.nodes.IBlock.generate(IBlock.java:15)
                	at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:65)
                	at jadx.core.dex.regions.Region.generate(Region.java:35)
                	at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:65)
                	at jadx.core.codegen.MethodGen.addRegionInsns(MethodGen.java:261)
                	at jadx.core.codegen.MethodGen.addInstructions(MethodGen.java:254)
                	at jadx.core.codegen.ClassGen.addMethodCode(ClassGen.java:349)
                	at jadx.core.codegen.ClassGen.addMethod(ClassGen.java:302)
                	at jadx.core.codegen.ClassGen.lambda$addInnerClsAndMethods$2(ClassGen.java:271)
                	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
                	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
                	at java.base/java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:395)
                	at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:261)
                Caused by: java.lang.IndexOutOfBoundsException: Index 1 out of bounds for length 1
                	at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100)
                	at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
                	at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
                	at java.base/java.util.Objects.checkIndex(Objects.java:385)
                	at java.base/java.util.ArrayList.get(ArrayList.java:427)
                	at jadx.core.codegen.InsnGen.makeInlinedLambdaMethod(InsnGen.java:909)
                	at jadx.core.codegen.InsnGen.makeInvokeLambda(InsnGen.java:814)
                	at jadx.core.codegen.InsnGen.makeInvoke(InsnGen.java:756)
                	at jadx.core.codegen.InsnGen.makeInsnBody(InsnGen.java:397)
                	at jadx.core.codegen.InsnGen.addWrappedArg(InsnGen.java:141)
                	at jadx.core.codegen.InsnGen.addArg(InsnGen.java:120)
                	at jadx.core.codegen.InsnGen.addArg(InsnGen.java:104)
                	at jadx.core.codegen.InsnGen.generateMethodArguments(InsnGen.java:976)
                	at jadx.core.codegen.InsnGen.makeConstructor(InsnGen.java:711)
                	at jadx.core.codegen.InsnGen.makeInsnBody(InsnGen.java:393)
                	at jadx.core.codegen.InsnGen.addWrappedArg(InsnGen.java:141)
                	at jadx.core.codegen.InsnGen.addArg(InsnGen.java:120)
                	at jadx.core.codegen.InsnGen.addArg(InsnGen.java:104)
                	at jadx.core.codegen.InsnGen.generateMethodArguments(InsnGen.java:976)
                	at jadx.core.codegen.InsnGen.makeConstructor(InsnGen.java:711)
                	at jadx.core.codegen.InsnGen.makeInsnBody(InsnGen.java:393)
                	at jadx.core.codegen.InsnGen.addWrappedArg(InsnGen.java:141)
                	at jadx.core.codegen.InsnGen.addArg(InsnGen.java:120)
                	at jadx.core.codegen.InsnGen.addArg(InsnGen.java:104)
                	at jadx.core.codegen.InsnGen.generateMethodArguments(InsnGen.java:976)
                	at jadx.core.codegen.InsnGen.makeConstructor(InsnGen.java:711)
                	at jadx.core.codegen.InsnGen.makeInsnBody(InsnGen.java:393)
                	at jadx.core.codegen.InsnGen.addWrappedArg(InsnGen.java:141)
                	at jadx.core.codegen.InsnGen.addArg(InsnGen.java:120)
                	at jadx.core.codegen.InsnGen.addArg(InsnGen.java:104)
                	at jadx.core.codegen.InsnGen.makeInsnBody(InsnGen.java:462)
                	at jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:278)
                	... 15 more
                */
            /*
            // Method dump skipped, instructions count: 232
            */
            throw new UnsupportedOperationException("Method not decompiled: com.corona.game.EvolutionAnim.HandleInput.firstStep(com.corona.Game):void");
        }

        @Override // com.corona.game.Action
        public void step(Game game) {
            if (InputProcessor.bJustPressed) {
                EvolutionAnim.isGreyscale = false;
                EvolutionAnim.drawPostEvoTop = false;
                EvolutionAnim.drawPostEvoBottom = false;
                game.actionStack.remove(this.currAction);
                game.actionStack.remove(this);
                game.insertAction(new WaitFrames(game, 30, new DisplayText.Clear(game, new WaitFrames(game, 3, new DisplayText(game, "Huh? " + this.pokemon.nickname.toUpperCase(Locale.ROOT) + " stopped evolving!", (String) null, true, true, (Action) new DisplayText.Clear(game, new WaitFrames(game, 3, new Done(new SetField(game.musicController, "evolveMusicFadeout", true, this.nextAction)))))))));
                return;
            }
            this.timer++;
            if (this.timer >= 464) {
                game.actionStack.remove(this);
            }
        }
    }

    /* compiled from: Battle.java */
    /* loaded from: pokewilds.jar:com/pkmngen/game/EvolutionAnim$Done.class */
    public static class Done extends Action {
        int timer = 0;

        public Done(Action nextAction) {
            super(new Object[0]);
            this.nextAction = nextAction;
        }

        @Override // com.corona.game.Action
        public void firstStep(Game game) {
            EvolutionAnim.bgSprite = new Sprite(TextureCache.get(Gdx.files.internal("battle/intro_frame6.png")), 0, 0, 176, 160);
        }

        @Override // com.corona.game.Action
        public void step(Game game) {
            if (this.timer == 2) {
                EvolutionAnim.drawSprite = false;
            }
            if (this.timer == 36) {
                game.insertAction(new EnterBuilding(game, "", null));
            }
            if (this.timer == 45) {
                EvolutionAnim.isDone = true;
                game.actionStack.remove(this);
                game.insertAction(this.nextAction);
            }
            this.timer++;
        }
    }

    /* compiled from: Battle.java */
    /* loaded from: pokewilds.jar:com/pkmngen/game/EvolutionAnim$StartMusic.class */
    public static class StartMusic extends Action {
        public StartMusic() {
            super(new Object[0]);
        }

        @Override // com.corona.game.Action
        public void firstStep(Game game) {
            game.currMusic = AudioLoader.loadMusic("sounds/evolution1.ogg");
            game.currMusic.play();
            game.actionStack.remove(this);
        }
    }
}
